# selemium 是一个Web应用程序的测试工具.selemium测试是知己额运行在浏览器中.模拟用户操作.
from selenium import webdriver


class Driven(object):
    """
        实现对各种浏览器和模拟器的驱动
    """

    # 要打开的浏览器
    driver = None

    @classmethod
    def get_driver(cls, browser_type="Chrome"):
        if not cls.driver:
            if browser_type == "Chrome":
                cls.driver = webdriver.Chrome()
            elif browser_type == "FireFox":
                cls.driver = webdriver.Firefox()
        return cls.driver

    @classmethod
    def get_app_driver(cls, package, activity, platformName="Android", platformVersion="4.4.2",
                       deviceName="127.0.0.1:62001"):
        pass
